namespace Core
{
    public interface IAStarCost
    {
        float Cost(Node cur, Node next);
    }

    /// <summary>
    /// 默认的代价计算
    /// </summary>
    public class DefaultAStarCost : IAStarCost
    {
        public float Cost(Node cur, Node next)
        {
            return 1;
        }
    }

    /// <summary>
    /// 野猪行动的代价计算
    /// </summary>
    public class WarthogCost : IAStarCost
    {
        public float Cost(Node cur, Node next)
        {
            return 1;
        }
    }

    /// <summary>
    /// 人类行动的代价计算
    /// </summary>
    public class HumanCost : IAStarCost
    {
        public float Cost(Node cur, Node next)
        {
            // 伪代码
            // if (next.Type == "城墙")
            // {
            //     return 10000;
            // }

            return 1;
        }
    }
}